home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Networking / OTStreamLogViewer1.0b2 / FileLogging.h < prev    next >
Encoding:
Text File  |  1998-07-06  |  2.0 KB  |  58 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        FileLogging.h
  3.  
  4.     Contains:    File logging engine for OTStreamLogViewer.
  5.  
  6.     Written by:    Quinn "The Eskimo!"
  7.  
  8.     Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.     You may incorporate this sample code into your applications without
  13.     restriction, though the sample code has been provided "AS IS" and the
  14.     responsibility for its operation is 100% yours.  However, what you are
  15.     not permitted to do is to redistribute the source as "DSC Sample Code"
  16.     after having made changes. If you're going to re-distribute the source,
  17.     we require that you make it clear in the source that the code was
  18.     descended from Apple Sample Code, but that you've made changes.
  19. */
  20.  
  21. /////////////////////////////////////////////////////////////////////
  22. // Pick up LogEntryPtr definition.
  23.  
  24. #import "LogEngine.h"
  25.  
  26. /////////////////////////////////////////////////////////////////////
  27.  
  28. extern OSStatus StartFileLogging(void);
  29.     // Tells the file log module that we're about to
  30.     // start logging records to the file using RecordLogEntryToFile.
  31.     // Returns an error if the file logging module could not
  32.     // start up, in which case the client should not call
  33.     // StopFileLogging.
  34.  
  35. // The following two routines both use the same assembly
  36. // buffer. If you call LogEntryToCString, you must copy the
  37. // results out of the buffer before you call either of
  38. // these routines again.
  39.  
  40. extern char *LogEntryToCString(LogEntryPtr thisEntry);
  41.     // Converts a log entry to a string.  The log module
  42.     // has to do this anyway, so we export the function
  43.     // for use by the clipboard code.
  44.     
  45. extern void RecordLogEntryToFile(LogEntryPtr thisEntry);
  46.     // Record a log entry to the log file.
  47.  
  48. extern void FileLoggingIdle(void);
  49.     // This routine is called periodically by the client
  50.     // to flush out any pending log entries.
  51.     
  52. extern Boolean FileLoggingActive(void);
  53.     // Returns whether a log file is currently open or not.
  54.  
  55. extern void StopFileLogging(void);
  56.     // Called by the client to shut down the file logging
  57.     // module.
  58.